﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="All-newsAlertSearch.aspx.cs"
    Inherits="MediaMonitor.Users.All_newsAlertSearch" EnableEventValidation="false" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<%@ Register TagPrefix="telerik" Namespace="Telerik.Charting" Assembly="Telerik.Web.UI" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>News Alert Search</title>
    <link rel="stylesheet" href="../css/style.css" />
        <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.1/jquery-ui.min.js"></script>

    <script type="text/javascript" src="../js/script.js"></script>
    <script type="text/javascript" src="../js/script2.js"></script>
    <script type="text/javascript" src="../js/script3.js"></script><script type="text/javascript" src="../js/highlight.js"></script>
      <script type="text/javascript" src="../js/jsWithLive.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:HiddenField ID="hdnUserID" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnUserRole" runat="server" ClientIDMode="Static" />
    <asp:HiddenField ID="hdnUserName" runat="server" ClientIDMode="Static" />
    <script src="../js/general.js" type="text/javascript"></script>
    <script type="text/javascript">

            $(document).ready(function () {




                $('#aHideChart').click(function () {

                    $('#ChartAvenueReport').hide();

                    $('#divSummary').addClass('hideShowChart1');

                    $('#divExport').addClass('hideShowChart');
                    $('#aShowChart').show();
                    $('#aHideChart').hide();
                });

                $('#aShowChart').click(function () {

                    $('#ChartAvenueReport').show();

                    $('#divSummary').removeClass('hideShowChart1');

                    $('#divExport').removeClass('hideShowChart');
                    $('#aHideChart').show();
                    $('#aShowChart').hide();
                });



            });

        </script> 
    <script type="text/javascript">
                      $(document).ready(function () {

                          var searchTerm = '<%= Session["NewsTitle"] %>'

                          // remove any old highlighted terms
                          $('body').removeHighlight();

                          // disable highlighting if empty
                          if (searchTerm) {
                              // highlight the new term
                              $('body').highlight(searchTerm);
                          }
                         
                         
                      });
    </script>
    <iframe id="frmDownload" width="1 " height="1" frameborder="0"></iframe>
    <script type="text/javascript">

        function GetDownload(id, type) {

            var iframe = document.getElementById("frmDownload");

            iframe.src = "../sitefiles/NewsAlert.aspx?id=" + id + "&type=" + type;

        }

    </script>
    <div class="wrapper-content" id="content">
            <div class="logo">
                <a href="defaultNew.aspx?Code=Home">
                    <img src="../images/logo.png" /></a>
            </div>
            <div class="container">
                <div class="news-page">
                    <div class="press-head">
                        <h1 style="text-align: center;">
                            <asp:Image ID="imgHead" runat="server" />
                        </h1>
                        <asp:LoginStatus ID="lgnStatus" runat="server" LogoutPageUrl="~/logout.aspx" LogoutAction="Redirect" />
                        <div class="go-back">
                            <a href="defaultNew.aspx?Code=Home">Go Back</a></div>
                        <div class="sort-date">
                               <asp:Button ID="btnExport" runat="server" Text="Export" OnClick="btnExport_Click" /> <h2>
                                Sort By: <span>
                                    <asp:DropDownList ID="ddlSortNews" runat="server" AutoPostBack="true" OnSelectedIndexChanged="ddlSortNews_SelectedIndexChanged">
                                        <asp:ListItem Text="Media Type"></asp:ListItem>
                                        <asp:ListItem Text="Title"></asp:ListItem>
                                        <asp:ListItem Text="Chronological"></asp:ListItem>
                                        <asp:ListItem Text="Most Recent">
                                        </asp:ListItem>
                                    </asp:DropDownList>
                                </span>
                            </h2>
                        </div>
                    </div>
                    <div class="news-content ">
                        <div class="press-content media-content">
                            <telerik:RadScriptManager runat="server" ID="RadScriptManager1" />
                             <asp:Panel ID="ListViewPanel1" runat="server">
                                <telerik:RadListView EnableViewState="true" ID="RadListView1" PageSize="12" runat="server" DataKeyNames="ID" CssClass="media-content"  OnPageIndexChanged="RadListView2_PageIndexChanged" AllowPaging="True" ItemPlaceholderID="ProductsHolder" >
                                    <LayoutTemplate>
               
                    <asp:Panel ID="ProductsHolder" runat="server"> </asp:Panel>
                                 <table cellpadding="0" cellspacing="0" width="100%;" style="clear: both; background: none repeat scroll 0% 0% rgb(238, 238, 238); padding: 10px; border: 1px solid rgb(204, 204, 204);">
        <tr>
           <td style="width: 60%;">
                <telerik:RadDataPager ID="RadDataPager1" runat="server" PagedControlID="RadListView1"
                 PageSize="12"   >
                    <Fields>
                        <telerik:RadDataPagerButtonField FieldType="FirstPrev"></telerik:RadDataPagerButtonField>
                        <telerik:RadDataPagerButtonField FieldType="Numeric"></telerik:RadDataPagerButtonField>
                        <telerik:RadDataPagerButtonField FieldType="NextLast"></telerik:RadDataPagerButtonField>
                    </Fields>
                </telerik:RadDataPager>
            </td>
            <td style="width: 40%;">
                <asp:Label ID="lblSort1" AssociatedControlID="cmbPageSize" runat="server" Text="" Style="padding-right: 5px;"></asp:Label>
              <telerik:RadComboBox runat="server" ID="cmbPageSize" OnSelectedIndexChanged="cmbPageSize_SelectedIndexChanged"
                                        AutoPostBack="true" Width="80px" SelectedValue="<%#Container.PageSize %>">
                                        <Items>
                                            <telerik:RadComboBoxItem Text="12" Value="12"></telerik:RadComboBoxItem>
                                            <telerik:RadComboBoxItem Text="24" Value="24"></telerik:RadComboBoxItem>
                                            <telerik:RadComboBoxItem Text="36" Value="36"></telerik:RadComboBoxItem>
                                            <telerik:RadComboBoxItem Text="48" Value="48"></telerik:RadComboBoxItem>
                                        </Items>
                                    </telerik:RadComboBox>
            </td>
        </tr>
    </table>
                   
               
            </LayoutTemplate>
                                    <ItemTemplate>
                                        <div id="Div4" runat="server" visible='<%# ifTrue(Eval("MediaTypeName"))%>' class="span3 press-inn tv-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                               <h5><a class='topopup4' style='cursor:pointer' val='<%#Eval("ID")%>'>
                                                    <%#Eval("Title")%></a></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p> <b>Hora:</b>
                                                        <%# Eval("PageorHour") %></p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                             <p>
                                                        <b>Duracion:</b> <span>
                                                            <%#Eval("Duration")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDTV-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDTVText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                    <div class="button-div-text">
                                                    <p>
                                                        <a href="javascript:void(0);"  class="topopup5" val='<%# Eval("ID") %>'>Calificación:</a>
                                                         <span id="spnCalificación-<%# Eval("ID") %>"> <b <%# color(Eval("Calification"))%>>
                                                            <%#Eval("Calification")%></b></span>
                                                        
                                                        </p>
                                                    <p>
                                                         <a href="javascript:void(0);" class="topopup6" val='<%# Eval("ID") %>'>Importancia:</a>
                                                         <span id="spnImportancia-<%# Eval("ID") %>"> <%# Eval("Important")%> </span>
                                                         
                                                       
                                                           </p>
                                                </div>
                                                <div class="button">
                                                   <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                        <img src="../images/icon1.jpg"></a> <a href="#" class="topopup2" val='<%# Eval("ID") %>' title='Comments <%# Eval("Totalrecord") %>'>
                                                           <img src='<%# checkComment(Eval("Totalrecord").ToString())%>'>
                                                        </a><a title="watch video" href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertvideo.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); "
                                                            style='display: <%#Eval("MediaTypeCode").ToString() == "1" ? "inline" : "none"  %>'>
                                                            <img src="../images/view-icon.jpg">
                                                        </a><a title="Share Video" href="#" class="topopup3" val='<%# Eval("ID") %>' sectioncode='<%#Eval("SectionCode")%>'
                                                            mediatypename='<%#Eval("MediaTypeName")%>' imageaudiovideoname=' <%# Eval("ImageAudioVideoName") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                            <img alt="Share Vedio" src="../images/share-video.jpg" />
                                                        </a> <a title="download" onclick='javascript:GetDownload("<%#Eval("ID")%>", "tv"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "1" ? "inline" : "none"  %>'>
                                    <img
                                        src="../images/download.jpg" /></a></div>
                                            </div>
                                        </div>
                                        <div id="Div1" runat="server" visible='<%# ifPreshTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                 <h5><a class='topopup4' style='cursor:pointer' val='<%#Eval("ID")%>'>
                                                    <%#Eval("Title")%></a></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                     <p> <b>Pagina:</b>
                                                        <%# Eval("PageorHour") %></p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDPress-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDPressText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                    <div class="button-div-text">
                                                    <p>
                                                        <a href="javascript:void(0);"  class="topopup5" val='<%# Eval("ID") %>'>Calificación:</a>
                                                         <span id="spnCalificación-<%# Eval("ID") %>"> <b <%# color(Eval("Calification"))%>>
                                                            <%#Eval("Calification")%></b></span>
                                                       
                                                        </p>
                                                    <p>
                                                         <a href="javascript:void(0);" class="topopup6" val='<%# Eval("ID") %>'>Importancia:</a>
                                                          <span id="spnImportancia-<%# Eval("ID") %>"> <%# Eval("Important")%> </span>
                                                         
                                                        
                                                          </p>
                                                </div>
                                                <div class="button">
                                                  <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                        <img src="../images/icon1.jpg"></a> </a> <a title='Comments <%# Eval("Totalrecord") %>' href="#" class="topopup2" val='<%# Eval("ID") %>'>
                                                           <img src='<%# checkComment(Eval("Totalrecord").ToString())%>'>
                                                        </a><a title="View" href="javascript:void(0);" onclick="PopupCenterWithScroll('../sitefiles/NewsAlertpress.aspx?ID=<%#Eval("ID")%>&t=s&file=<%#Eval("ImageAudioVideoName")%>', '_blank', 750, 700); ">
                                                            <img src="../images/view-icon.jpg"></a><a title="Share Image" href="#" class="topopup3" val='<%# Eval("ID") %>'
                                                                sectioncode='<%#Eval("SectionCode")%>' mediatypename='<%#Eval("MediaTypeName")%>'
                                                                imageaudiovideoname=' <%# Eval("ImageAudioVideoName") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'><img alt="Share Vedio"
                                                                    src="../images/share-video.jpg" />
                                                            </a> <a title="download" onclick='javascript:GetDownload("<%#Eval("ID")%>", "press"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "6" ? "inline" : "none"  %>'>
                                    <img
                                        src="../images/download.jpg" /></a></div>
                                            </div>
                                        </div>
                                        <div id="Div2" runat="server" visible='<%# ifRadioTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn radio-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                 <h5><a class='topopup4' style='cursor:pointer' val='<%#Eval("ID")%>'>
                                                    <%#Eval("Title")%></a></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p> <b>Hora:</b>
                                                        <%# Eval("PageorHour") %></p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                             <p>
                                                        <b>Duracion:</b> <span>
                                                            <%#Eval("Duration")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDRadio-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDRadioText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                     <div class="button-div-text">
                                                    <p>
                                                        <a href="javascript:void(0);"  class="topopup5" val='<%# Eval("ID") %>'>Calificación:</a>
                                                         <span id="spnCalificación-<%# Eval("ID") %>"> <b <%# color(Eval("Calification"))%>>
                                                            <%#Eval("Calification")%></b></span>
                                                       
                                                        </p>
                                                    <p>
                                                         <a href="javascript:void(0);" class="topopup6" val='<%# Eval("ID") %>'>Importancia:</a>
                                                          <span id="spnImportancia-<%# Eval("ID") %>"> <%# Eval("Important")%> </span>
                                                          
                                                          </p>
                                                </div>
                                                <div class="button">
                                                  <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                        <img src="../images/icon1.jpg"></a> <a title='Comments <%# Eval("Totalrecord") %>' href="#" class="topopup2" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                            <img src='<%# checkComment(Eval("Totalrecord").ToString())%>'>
                                                            
                                                        </a><a title="Listen Audio" href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertradio.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); ">
                                                            <img src="../images/view-icon.jpg">
                                                        </a><a title="Share Audio" href="#" class="topopup3" val='<%# Eval("ID") %>' sectioncode='<%#Eval("SectionCode")%>'
                                                            mediatypename='<%#Eval("MediaTypeName")%>' imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                            <img alt="share-video" src="../images/share-video.jpg" />
                                                        </a><a title="download" onclick='javascript:GetDownload("<%#Eval("ID")%>", "radio"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "3" ? "inline" : "none"  %>'>
                                    <img
                                        src="../images/download.jpg" /></a></div>
                                            </div>
                                        </div>
                                        <div id="Div6" runat="server" visible='<%# ifCountrysideRadioTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn radio-inn">
                                            <h4>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h4>
                                            <div class="press-data">
                                                 <h5><a class='topopup4' style='cursor:pointer' val='<%#Eval("ID")%>'>
                                                    <%#Eval("Title")%></a></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p> <b>Hora:</b>
                                                        <%# Eval("PageorHour") %></p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                             <p>
                                                        <b>Duracion:</b> <span>
                                                            <%#Eval("Duration")%></span></p>
                                                </div>
                                                <div class="press-detail" id='Div7'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='Div8'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                     <div class="button-div-text">
                                                    <p>
                                                        <a href="javascript:void(0);"  class="topopup5" val='<%# Eval("ID") %>'>Calificación:</a>
                                                         <span id="Span1"> <b <%# color(Eval("Calification"))%>>
                                                            <%#Eval("Calification")%></b></span>
                                                       
                                                        </p>
                                                    <p>
                                                         <a href="javascript:void(0);" class="topopup6" val='<%# Eval("ID") %>'>Importancia:</a>
                                                          <span id="Span2"> <%# Eval("Important")%> </span>
                                                          
                                                          </p>
                                                </div>
                                                <div class="button">
                                                  <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                        <img src="../images/icon1.jpg"></a> <a title='Comments <%# Eval("Totalrecord") %>' href="#" class="topopup2" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                            <img src='<%# checkComment(Eval("Totalrecord").ToString())%>'>
                                                            
                                                        </a><a title="Listen Audio" href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertradio.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); ">
                                                            <img src="../images/view-icon.jpg">
                                                        </a><a title="Share Audio" href="#" class="topopup3" val='<%# Eval("ID") %>' sectioncode='<%#Eval("SectionCode")%>'
                                                            mediatypename='<%#Eval("MediaTypeName")%>' imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'>
                                                            <img alt="share-video" src="../images/share-video.jpg" />
                                                        </a><a title="download" onclick='javascript:GetDownload("<%#Eval("ID")%>", "radio"); return false;' href="javascript:void(0);"
                                    style='display: <%#Eval("MediaTypeCode").ToString() == "3" ? "inline" : "none"  %>'>
                                    <img
                                        src="../images/download.jpg" /></a></div>
                                            </div>
                                        </div>
                                        <div id="Div3" runat="server" visible='<%# ifInternetTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn internet-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                 <h5><a class='topopup4' style='cursor:pointer' val='<%#Eval("ID")%>'>
                                                    <%#Eval("Title")%></a></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <%-- <p> <b>Pagina:</b>
                                                        <%# Eval("PageorHour") %></p>
                                                    <p>--%>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDInternet-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDInternetText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                  <div class="button-div-text">
                                                    <p>
                                                        <a href="javascript:void(0);"  class="topopup5" val='<%# Eval("ID") %>'>Calificación:</a>
                                                        <span id="spnCalificación-<%# Eval("ID") %>"> <b <%# color(Eval("Calification"))%>>
                                                            <%#Eval("Calification")%></b></span>
                                                     
                                                         </p>
                                                    <p>
                                                         <a href="javascript:void(0);" class="topopup6" val='<%# Eval("ID") %>'>Importancia:</a>
                                                         <span id="spnImportancia-<%# Eval("ID") %>"> <%# Eval("Important")%> </span>
                                                         
                                                  
                                                           </p>
                                                </div>
                                                <div class="button">
                                                 <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'> 
                                                        <img src="../images/icon1.jpg"></a> <a title='Comments <%# Eval("Totalrecord") %>' href="#" class="topopup2" val='<%# Eval("ID") %>'>
                                                           <img src='<%# checkComment(Eval("Totalrecord").ToString())%>'>
                                                        </a><a title="View" href="javascript:void(0);" onclick="PopupCenterWithScroll('../sitefiles/Internet.aspx?ID=<%#Eval("ID")%>&t=s&file=<%#Eval("ImageAudioVideoName")%>', '_blank', 750, 700); ">
                                                            <img src="../images/view-icon.jpg"></a><a title="Share Image" href="#" class="topopup3" val='<%# Eval("ID") %>'
                                                                sectioncode='<%#Eval("SectionCode")%>' mediatypename='<%#Eval("MediaTypeName")%>'
                                                                imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>' subject='<%# Eval("Title") %>' SentBy='<%# Request.Cookies["User"]["UserName"] %>'><img alt="Share Vedio"
                                                                    src="../images/share-video.jpg" />
                                                            </a><a title="download" onclick='javascript:GetDownload("<%#Eval("ID")%>", "Internet"); return false;'
                                        href="javascript:void(0);" style='display: <%#Eval("MediaTypeCode").ToString() == "9" ? "inline" : "none"  %>'>
                                        <img src="../images/download.jpg" /></a></div>
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                    <%--<AlternatingItemTemplate>
                                        <div id="Div1" runat="server" visible='<%# ifTrue(Eval("MediaTypeName"))%>' class="span3 press-inn tv-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                <h5>
                                                    <%#Eval("Title")%></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDAltTV-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDAltTVText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                <div class="button-div-text">
                                                    <p>
                                                        Calificacion:<span>
                                                            <%#Eval("Calification")%></span></p>
                                                    <p>
                                                        Importancia:<span>
                                                            <%#Eval("Important")%></span></p>
                                                </div>
                                                <div class="button">
                                                  <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>'>
                                                        <img src="../images/icon1.jpg"></a> <a title="Comments" href="#" class="topopup2" val='<%# Eval("ID") %>'>
                                                            <img src="../images/chat-icon.jpg">
                                                        </a><a title="View" href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertvideo.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); ">
                                                            <img src="../images/view-icon.jpg">
                                                        </a><a title="Share Image" href="#" class="topopup3" val='<%# Eval("ID") %>' sectioncode='<%#Eval("SectionCode")%>'
                                                            mediatypename='<%#Eval("MediaTypeName")%>' imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>'>
                                                            <img alt="Share Vedio" src="../images/share-video.jpg" />
                                                        </a></div>
                                            </div>
                                        </div>
                                        <div id="Div2" runat="server" visible='<%# ifPreshTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                <h5>
                                                    <%#Eval("Title")%></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDAltPress-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDAltPressText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                <div class="button-div-text">
                                                    <p>
                                                        Calificacion:<span>
                                                            <%#Eval("Calification")%></span></p>
                                                    <p>
                                                        Importancia:<span>
                                                            <%#Eval("Important")%></span></p>
                                                </div>
                                                <div class="button">
                                                    <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>'>
                                                        <img src="../images/icon1.jpg"></a> <a title="Comments" href="#" class="topopup2" val='<%# Eval("ID") %>'>
                                                            <img src="../images/chat-icon.jpg">
                                                        </a><a title="View" href="javascript:void(0);" onclick="PopupCenterWithScroll('../sitefiles/NewsAlertpress.aspx?ID=<%#Eval("ID")%>&t=s&file=<%#Eval("ImageAudioVideoName")%>', '_blank', 750, 700); ">
                                                            <img src="../images/view-icon.jpg"></a><a title="Share Image" href="#" class="topopup3" val='<%# Eval("ID") %>'
                                                                sectioncode='<%#Eval("SectionCode")%>' mediatypename='<%#Eval("MediaTypeName")%>'
                                                                imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>'><img alt="Share Vedio"
                                                                    src="../images/share-video.jpg" />
                                                            </a></div>
                                            </div>
                                        </div>
                                        <div id="Div3" runat="server" visible='<%# ifRadioTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn radio-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                <h5>
                                                    <%#Eval("Title")%></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDAltRadio-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDAltRadioText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                <div class="button-div-text">
                                                    <p>
                                                        Calificacion:<span>
                                                            <%#Eval("Calification")%></span></p>
                                                    <p>
                                                        Importancia:<span>
                                                            <%#Eval("Important")%></span></p>
                                                </div>
                                                <div class="button">
                                                   <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>'>
                                                        <img src="../images/icon1.jpg"></a> <a title="Comments" href="#" class="topopup2" val='<%# Eval("ID") %>'>
                                                            <img src="../images/chat-icon.jpg">
                                                        </a><a title="View" href="javascript:void(0);" onclick="PopupCenter('../sitefiles/NewsAlertradio.aspx?SectionCode=<%#Eval("SectionCode")%>&t=f&ID=<%#Eval("ID")%>', '_blank', 350, 280); ">
                                                            <img src="../images/view-icon.jpg"></a><a title="Share Image" href="#" class="topopup3" val='<%# Eval("ID") %>'
                                                                sectioncode='<%#Eval("SectionCode")%>' mediatypename='<%#Eval("MediaTypeName")%>'
                                                                imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>'><img alt="Share Vedio"
                                                                    src="../images/share-video.jpg" />
                                                            </a></div>
                                            </div>
                                        </div>
                                        <div id="Div4" runat="server" visible='<%# ifInternetTrue(Eval("MediaTypeName"))%>'
                                            class="span3 press-inn internet-inn">
                                            <h2>
                                                <%# Eval("MediaTypeName")%>
                                                - <small>
                                                    <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></small></h2>
                                            <div class="press-data">
                                                <h5>
                                                    <%#Eval("Title")%></h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                        <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%></p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                            <%#Eval("MediaName")%>
                                                        </span>
                                                    </p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                            <%#Eval("SectionDescription")%></span></p>
                                                </div>
                                                <div class="press-detail" id='IDAltInternet-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("NewsSummary")%></p>
                                                </div>
                                                <div class="press-detail" style="display: none;" id='IDAltInternetText-<%# Eval("ID") %>'>
                                                    <p>
                                                        <%#Eval("News")%></p>
                                                </div>
                                            </div>
                                            <div class="button-div">
                                                <div class="button-div-text">
                                                    <p>
                                                        Calificacion:<span>
                                                            <%#Eval("Calification")%></span></p>
                                                    <p>
                                                        Importancia:<span>
                                                            <%#Eval("Important")%></span></p>
                                                </div>
                                                <div class="button">
                                                  <a href="#" val='<%# Eval("ID") %>' class="topopup4" title="Read More">
                                                        <img src="../images/icon.jpg">
                                                    </a><a title="Share News" href="#" class="topopup" val='<%# Eval("ID") %>'>
                                                        <img src="../images/icon1.jpg"></a> <a title="Comments" href="#" class="topopup2" val='<%# Eval("ID") %>'>
                                                            <img src="../images/chat-icon.jpg">
                                                        </a><a title="View" href="javascript:void(0);" onclick="PopupCenterWithScroll('../sitefiles/Internet.aspx?ID=<%#Eval("ID")%>&t=s&file=<%#Eval("ImageAudioVideoName")%>', '_blank', 750, 700); ">
                                                            <img src="../images/view-icon.jpg"></a><a title="Share Image" href="#" class="topopup3" val='<%# Eval("ID") %>'
                                                                sectioncode='<%#Eval("SectionCode")%>' mediatypename='<%#Eval("MediaTypeName")%>'
                                                                imageaudiovideoname='<%# Eval("ImageAudioVideoName") %>'><img alt="Share Vedio"
                                                                    src="../images/share-video.jpg" />
                                                            </a></div>
                                            </div>
                                        </div>
                                    </AlternatingItemTemplate>--%>
                                </telerik:RadListView>
                            </asp:Panel>
                
                            <div style="color: Red; font-size: xx-large; text-align: center;margin-top: 15px;">
                                <asp:Label ID="lblNoRecord" runat="server" Text="" ForeColor="red" Font-Size="XX-Large"></asp:Label>
                            </div>
                        </div>
                    </div>
                </div>
                  <div>
                <div style="float:left;">
                <a id="aHideChart" href="javascript:void(0)">Hide Chart</a>&nbsp;&nbsp;<a id="aShowChart"
                    href="javascript:void(0)" style="display: none;">Show Chart</a>
                <telerik:RadChart ID="ChartAvenueReport" ChartTitle-TextBlock-Text="Calificación" runat="server"
                    Height="250px" Width="400px">
                    <PlotArea>
                        <YAxis MaxValue="80">
                        </YAxis>
                        <XAxis MaxValue="1">
                        </XAxis>
                    </PlotArea>
                    <Series>
                        <telerik:ChartSeries Name="series 1" ActiveRegionToolTip="Click here" DataLabelsColumn="NewsAlertSTATUS"
                            DataYColumn="VALUE">
                            <Appearance LegendDisplayMode="ItemLabels">
                            </Appearance>
                        </telerik:ChartSeries>
                    </Series>
                    <telerik:ChartTitle>
                        <TextBlock Text="Postback Events">
                        </TextBlock>
                    </telerik:ChartTitle>
                </telerik:RadChart>
                </div>
                <div style="float:right;">
                  <a id="aHide" href="javascript:void(0)">Hide Chart</a>&nbsp;&nbsp;<a id="aShow"
                    href="javascript:void(0)" style="display: none;">Show Chart</a>
                  <telerik:RadChart ID="RadChart1" ChartTitle-TextBlock-Text="Medios" runat="server"
                    Height="250px" Width="400px">
                    <PlotArea>
                        <YAxis MaxValue="80">
                        </YAxis>
                        <XAxis MaxValue="1">
                        </XAxis>
                    </PlotArea>
                    <Series>
                        <telerik:ChartSeries Name="series 1" ActiveRegionToolTip="Click here" DataLabelsColumn="NewsAlertCOUNT"
                            DataYColumn="VALUE">
                            <Appearance LegendDisplayMode="ItemLabels">
                            </Appearance>
                        </telerik:ChartSeries>
                    </Series>
                    <telerik:ChartTitle>
                        <TextBlock Text="Postback Events">
                        </TextBlock>
                    </telerik:ChartTitle>
                </telerik:RadChart>
                </div>
                </div>
            </div>
        </div>
    </div>
    <div id="toPopup">
        <div class="close">
        </div>
        <span class="ecs_tooltip">Press Esc to close <span class="arrow"></span></span>
        <div id="popup_content">
            <!--your content start-->
            <table width="100%" style="padding: 10px;">
                <tr>
                    <td>
                    </td>
                    <td align="right">
                        <asp:HiddenField ID="hdnID" runat="server" ClientIDMode="Static" />
                    </td>
                </tr>
                <tr>
                <td> 
                Subject:
                </td>
                <td>
                <asp:TextBox ID="txtSubject" Width="420px" runat="server" ClientIDMode="Static" ></asp:TextBox>
                </td>
                </tr>
                <tr>
                <td>
                Sent by:
                </td>
                <td>
                <asp:TextBox ID="txtSentby" Width="200px" runat="server" ClientIDMode="static"></asp:TextBox>
                </td>
                </tr>
                <tr>
                <td>
                Email Body:
                </td>
                <td>
                <asp:TextBox ID="txtEmailBody" Width="420px" runat="server" TextMode="MultiLine"  ClientIDMode="Static"></asp:TextBox>
                </td>
                </tr>
                <tr>
                    <td>
                        Please enter Email :
                    </td>
                    <td>
                        <asp:TextBox ID="txtSendEmail" runat="server"  CssClass="autosuggest" ClientIDMode="Static"></asp:TextBox>
                      
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnSearch1" ValidationGroup="send" CssClass="btn" Text="Send" runat="server"
                            OnClick="btnSearch_click" />
                    </td>
                </tr>
            </table>
        </div>
        <!--your content end-->
    </div>
    <div id="toPopup2">
        <div class="close2">
        </div>
        <span class="ecs_tooltip2">Press Esc to close <span class="arrow2"></span></span>
        <div id="popup_content2">
            <!--your content start-->
            <table width="100%" style="padding: 10px;">
                <tr>
                    <td>
                    </td>
                    <td align="right">
                        <asp:HiddenField ID="hdnComentID" runat="server" ClientIDMode="Static" />
                         <asp:HiddenField ID="hdncomentEditID" runat="server" Value="0" ClientIDMode="Static" />
                    </td>
                </tr>
                
                <tr>
                    <td>
                        Comment :
                    </td>
                    <td>
                        <asp:TextBox ID="txtComent" ClientIDMode="Static" runat="server" Width="300px" Rows="4" ValidationGroup="cmt"
                            TextMode="MultiLine"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="btnComment1" ValidationGroup="cmt" CssClass="btn" Text="Save" runat="server"
                            OnClick="btnComment_click" />
                    </td>
                </tr>
               
            </table>
            <div class="allcomments">
                        <table width="100%" cellspacing="0" cellpadding="0" id="NamesGridView">
                        </table></div>
                  
        </div>
        
        <!--your content end-->
    </div>
    <div id="topopup3">
        <div class="close3">
        </div>
        <span class="ecs_tooltip3">Press Esc to close <span class="arrow3"></span></span>
        <div id="popup_content3">
            <!--your content start-->
            <table width="100%" style="padding: 10px;">
                <tr>
                    <td>
                    </td>
                    <td align="right">
                        <asp:HiddenField ID="hdnShareVedioID" runat="server" ClientIDMode="Static" />
                        <asp:HiddenField ID="hdnSectionCode" runat="server" ClientIDMode="Static" />
                        <asp:HiddenField ID="hdnMediaTypeName" runat="server" ClientIDMode="Static" />
                        <asp:HiddenField ID="hdnImageAudioVideoName" runat="server" ClientIDMode="Static" />
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <table id="Table1">
                        </table>
                    </td>
                </tr>
                <tr>
                <td>
                Subject:
                </td>
                <td>
                <asp:TextBox ID="txtShareSubject" runat="server" ClientIDMode="Static" Width="420px"></asp:TextBox>
                </td>
                </tr>
                <tr>
                <td>
                Sent By:
                </td>
                <td>
                <asp:TextBox ID="txtShareSentBy" runat="server" ClientIDMode="Static" Width="200px"></asp:TextBox>
                </td>
                </tr>
                <tr>
                <td>
                Email Body:
                </td>
                <td>
                <asp:TextBox ID="txtShareEmailBody" runat="server" ClientIDMode="Static" Width="420px" TextMode="MultiLine"></asp:TextBox>
                </td>
                </tr>
                <tr>
                    <td>
                        Enter an email :
                    </td>
                    <td>
                        <asp:TextBox ID="txtEmailForShareVideo" runat="server" Width="300px" ValidationGroup="shared"
                            TextMode="SingleLine" CssClass="auto" ClientIDMode="Static"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td>
                        &nbsp;
                    </td>
                    <td>
                        <asp:Button ID="imgbtnShareVideo1" CssClass="btn" ValidationGroup="shared" Text="Send"
                            runat="server" OnClick="imgbtnShareVideo1_click" />
                        <%-- <asp:ImageButton ID="imgbtnShareVideo" ValidationGroup="shared" runat="server" OnClick="imgbtnShareVideo_click"
                            SkinID="Save" />--%>
                    </td>
                </tr>
            </table>
        </div>
        <!--your content end-->
    </div>
    <div id="topopup4">
        <div class="close4">
        </div>
        <span class="ecs_tooltip4">Press Esc to close <span class="arrow4"></span></span>
        <div id="popup_content4">
            <!--your content start-->
          <div id="Div5" class="wrapper-content">

<div class="container">
<div class="logol">
     <a href="default.aspx"> <img src="../images/logo.png" /></a>
        </div>
<div class="news-content ">
      <div id="Div3" runat="server" visible="true"
                                            class="span3 press-inn internet-inn">
                                            <h2>
                                            <span id="lblMediaTypeName"></span>  
                                              
                                                - <small>
                                                <span id="lblRFDate"></span> 
                                                   <%-- <%# Convert.ToDateTime(Eval("RFDate")).ToString("d")%>--%></small></h2>
                                            <div class="press-data">
                                                <h5>
                                                 <span id="lblTitle" ></span> 
                                                  </h5>
                                                <div class="info">
                                                    <p>
                                                        <b>Fecha:</b>
                                                         <span id="lblRFDate2" ></span> 
                                                       </p>
                                                    <p>
                                                        <b>Medio:</b><span class="blue-color">
                                                         <span id="lblMediaName" ></span> 
                                                           
                                                        </span>
                                                    </p>
                                                    <p>
                                                        <b>Seccion:</b> <span>
                                                          <span id="lblSectionDescription" ></span> 
                                                           </span></p>
                                                </div>
                                                <div class="press-detail">
                                                    <p> <span id="lblNews" ></span> 
                                                        </p>
                                                </div>
                                                
                                            </div>
                                            <div class="button-div">
                                                <div class="button-div-text">
                                                    <p>
                                                        Calificacion:<span>
                                                        <span id="lblCalification" ></span> 
                                                           </span></p>
                                                    <p>
                                                        Importancia:<span>
                                                        <span id="lblImportant" ></span> 
                                                           </span></p>
                                                </div>
                                                <div class="button">
                                                    <a href="#" class="minuse" title="Read More">
                                                        <img src="../images/minus-icon.jpg">
                                                    </a><a id="aShareNews" title="Share News" href="#" class="topopup" val=''>
                                                        <img src="../images/icon1.jpg"></a> <a id="aComments" title="Comments" href="#" class="topopup2"
                                                            val=''>
                                                            <img id="AddImg" src="../images/chat-icon.jpg">
                                                        </a><a id="aView" title="" href="javascript:void(0);" val='' imagename='' MediaTypeName='' SectionCode=''>
                                                            <img src="../images/view-icon.jpg"></a><a id="ashareVideo" title=""  href="#" class="topopup3"
                                                                val='' sectioncode='' mediatypename=''
                                                                imageaudiovideoname=''><img alt="Share Vedio" src="../images/share-video.jpg" />
                                                            </a><a id="aDownloadVideo" val="" MediaTypeCode=""  title="download"  href="javascript:void(0);">
                                    <img
                                        src="../images/download.jpg" /></a>
                                                </div>
                                        </div>
</div>
    </div></div></div>
        </div>
        <!--your content end-->
    </div>
        <div id="topopup5">
        <div class="close5">
        </div>
        <span class="ecs_tooltip5">Press Esc to close <span class="arrow5"></span></span>
   
                        <table width="60%" style="padding:20px">
                            <tr>
                                <td>
                                    CALIFICACION
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddlCALIFICACION" ClientIDMode="Static">
                                        <asp:ListItem Text="Positiva" Value="Positiva"></asp:ListItem>
                                        <asp:ListItem Text="Negativa" Value="Negativa"></asp:ListItem>
                                        <asp:ListItem Text="Neutra" Value="Neutra"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button runat="server" ID="btnCALIFICACIONSave" CssClass="btn" Text="SAVE"   OnClick="btnCALIFICACIONSave_click" />
                                </td>
                                <td>
                                    <asp:Button runat="server" ID="btnCALIFICACIONCancel" CssClass="btn" Text="Cancel" />
                                </td>
                            </tr>
                        </table>
                    
        <!--your content end-->
    </div>
      <div id="topopup6">
        <div class="close6">
        </div>
        <span class="ecs_tooltip6">Press Esc to close <span class="arrow6"></span></span>
   
                        <table width="60%" style="padding:20px;">
                            <tr>
                                <td>
                                    IMPORTANCIA
                                </td>
                                <td>
                                    <asp:DropDownList runat="server" ID="ddlIMPORTANCIA" ClientIDMode="Static">
                                        <asp:ListItem Text="1" Value="1"></asp:ListItem>
                                        <asp:ListItem Text="2" Value="2"></asp:ListItem>
                                        <asp:ListItem Text="3" Value="3"></asp:ListItem>
                                        <asp:ListItem Text="4" Value="4"></asp:ListItem>
                                        <asp:ListItem Text="5" Value="5"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    <asp:Button runat="server" ID="btnIMPORTANCIASave" CssClass="btn" Text="SAVE"   OnClick="btnIMPORTANCIASave_click" />
                                </td>
                                <td>
                                    <asp:Button runat="server" ID="btnIMPORTANCIACancel" CssClass="btn" Text="Cancel" />
                                </td>
                            </tr>
                        </table>
                    
        <!--your content end-->
    </div>


    <asp:HiddenField ID="hdnlblCalification" runat="server" ClientIDMode="Static"/>
    <asp:HiddenField ID="hdnImportancia" runat="server" ClientIDMode="Static"/>
    <script type="text/javascript">
        function showNestedGridView(obj, obj2) {
            var nestedGridView = document.getElementById(obj);
            var divText = document.getElementById(obj2);
            //var imageID = document.getElementById('image' + obj);

            if (nestedGridView.style.display == "none") {
                nestedGridView.style.display = "block";
                divText.style.display = "none";
                //  imageID.src = "minus.png";
            } else {
                nestedGridView.style.display = "none";
                divText.style.display = "block";
                //imageID.src = "plus.png";
            }
        }
        

    </script>
     <script>
         $(document).ready(function () {
             $('a.topopup5').click(function () {
                 $('#hdnlblCalification').val($(this).attr('val'));
             });

         });
         function myFunction(id, class2) {
             $('#spnCalificación-' + id).children().html(class2);
             $('#spnCalificación-' + id).children().removeClass();
             $('#spnCalificación-' + id).children().addClass(class2)
         }
    </script>
    <script>
        $(document).ready(function () {
            $('a.topopup6').click(function () {
                $('#hdnlblCalification').val($(this).attr('val'));
            });
        });
        function myFunction1(id1, class3) {
            $('#spnImportancia-' + id1).html(class3);
        }
    </script>
      


    <script>
        $(document).ready(function () {

            $('a.topopup').click(function () {
                $('#hdnID').val($(this).attr('val'));
                $('#txtSubject').val($(this).attr('subject'));
                $('#txtSentby').val($(this).attr('SentBy'));
                $('#txtEmailBody').val('Estimado Usuario,\n ha querido compartir este link con usted por favor presione debajo para acceder:')
            });
            $('a.topopup3').click(function () {
                $('#hdnShareVedioID').val($(this).attr('val'));
                $('#hdnSectionCode').val($(this).attr('sectioncode'));
                $('#hdnMediaTypeName').val($(this).attr('mediatypename'));
                $('#hdnImageAudioVideoName').val($(this).attr('ImageAudioVideoName'));
                $('#txtShareSubject').val($(this).attr('subject'));
                $('#txtShareSentBy').val($(this).attr('SentBy'));
                $('#txtShareEmailBody').val('Estimado Usuario,\n ha querido compartir este link con usted por favor presione debajo para acceder:')
            });
            $("a.topopup2").click(function () {
                $("#hdnComentID").val($(this).attr('val'));
                var ID = $(this).attr('val');
                var jsdata = '{IDN:' + ID + '}';
                $("#NamesGridView").html('');
                $.ajax({

                    type: "POST",

                    url: "all-newsalertLast.aspx/GetNames",

                    data: jsdata,

                    contentType: "application/json",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {
                            $("#NamesGridView").append("<tr><td><span id='spnCommennts-" + data.d[i].ID + "'>" + data.d[i].Comments +
                                            "<span></td><td>User:" + data.d[i].FullName + "&nbsp;&nbsp;" + "/" + data.d[i].RFDate + " <span>&nbsp;&nbsp;" + data.d[i].time + "</span></td><td><a href='javascript:void(0);' class='aEdit' style='display:" + display(data.d[i].UserID, $('#hdnUserRole').val()) + ";' val='" + data.d[i].ID + "'>Edit/</a><a href='javascript:void(0);' class='aDelete' style='display:" + display(data.d[i].UserID, $('#hdnUserRole').val()) + ";' val='" + data.d[i].ID + "'>Delete</a></td></tr>");
                        }

                    }
                })

            });


            $('a.aDelete').live("click", function () {
                var ID = $(this).attr('val');
                var jsdata = '{id:' + ID + '}';
                $.ajax({

                    type: "POST",

                    url: "all-newsalertLast.aspx/delete",

                    data: jsdata,

                    contentType: "application/json",
                    dataType: "json",
                    success: function (data) {

                    }
                })
                $(this).closest("tr").hide();
            });
            $('a.aEdit').live("click", function () {

                $("#hdncomentEditID").val($(this).attr('val'));

                var comment = $('#spnCommennts-' + $(this).attr('val')).text()
                $('#txtComent').val(comment);
            });
            $("a.topopup4").click(function () {

                var ID = $(this).attr('val');
                var jsdata = '{ID:' + ID + '}';
                $("#lblMediaTypeName").html('');
                $("#lblMediaTypeName").html('');
                $("#lblRFDate").html('');
                $("#lblRFDate2").html('');
                $("#lblMediaName").html('');
                $("#lblSectionDescription").html('');
                $("#lblNews").html('');
                $("#lblCalification").html('');
                $("#lblImportant").html('');
                $.ajax({

                    type: "POST",

                    url: "all-newsalertLast.aspx/getNewsAlert",

                    data: jsdata,

                    contentType: "application/json",
                    dataType: "json",
                    success: function (data) {
                        for (var i = 0; i < data.d.length; i++) {
                            $("#lblMediaTypeName").html(data.d[i].MediaTypeName);
                            $("#lblMediaTypeName").html(data.d[i].Title);
                            $("#lblRFDate").html(data.d[i].RFDate);
                            $("#lblRFDate2").html(data.d[i].RFDate);
                            $("#lblMediaName").html(data.d[i].MediaName);
                            $("#lblSectionDescription").html(data.d[i].SectionDescription);
                            $("#lblNews").html(data.d[i].News);
                            $("#lblCalification").html(data.d[i].Calification);
                            $("#lblImportant").html(data.d[i].Important);
                            $('#aShareNews').attr("val", data.d[i].ID);
                            $('#aComments').attr("val", data.d[i].ID);
                            $('#aView').attr("val", data.d[i].ID);
                            $('#aView').attr("imagename", data.d[i].ImageAudioVideoName);
                            $('#aView').attr("MediaTypeName", data.d[i].MediaTypeName);
                            $('#aView').attr("SectionCode", data.d[i].SectionCode);
                            $('#ashareVideo').attr("val", data.d[i].ID);
                            $('#ashareVideo').attr("sectioncode", data.d[i].SectionCode);
                            $('#ashareVideo').attr("mediatypename", data.d[i].MediaTypeName);
                            $('#ashareVideo').attr("imageaudiovideoname", data.d[i].ImageAudioVideoName);
                            switch (data.d[i].MediaTypeName) {
                                case 'TV':
                                    $('#aView').attr("title", 'watch video');
                                    $('#ashareVideo').attr("title", 'Share Video');
                                    break;
                                case 'Radio':
                                    $('#aView').attr("title", 'Listen Audio');
                                    $('#ashareVideo').attr("title", 'Share Audio');
                                    break;
                                case 'Press':
                                    $('#aView').attr("title", 'View');
                                    $('#ashareVideo').attr("title", 'Share Image');
                                    break;
                                case 'Internet':
                                    $('#aView').attr("title", 'View');
                                    $('#ashareVideo').attr("title", 'Share Image');
                                    break;
                            }
                            $('#aComments').attr('title', 'Comments' + ' ' + data.d[i].Totalrecord);
                            //check comment count
                            var CommentCount = parseInt(data.d[i].Totalrecord);
                            if (CommentCount > 0) {
                                $("#AddImg").attr("src", "../images/chat-icon2.png");
                            }
                            else {
                                $("#AddImg").attr("src", "../images/chat-icon.jpg");
                            }
                            $('#aDownloadVideo').attr("val", data.d[i].ID);
                            $('#aDownloadVideo').attr("MediaTypeCode", data.d[i].MediaTypeName);
                        }
                    }
                })

            });
            $('#aDownloadVideo').click(function () {
                GetDownload($(this).attr('val'), $(this).attr('MediaTypeCode'));
                return false;

            });
            $('#aView').click(function () {
                popup($(this).attr('val'), $(this).attr('imagename'), $(this).attr('MediaTypeName'), $(this).attr('SectionCode'));
            });

            function popup(ID, Name, MediaType, SectionCode) {
                switch (MediaType) {
                    case "Internet":
                        PopupCenterWithScroll('../sitefiles/Internet.aspx?ID=' + ID + '&t=s&file=' + Name, '_blank', 750, 700);
                        break;
                    case "TV":
                        PopupCenter('../sitefiles/NewsAlertvideo.aspx?SectionCode=' + SectionCode + '&t=f&ID=' + ID, '_blank', 350, 280);
                        break;
                    case "Radio":
                        PopupCenter('../sitefiles/NewsAlertradio.aspx?SectionCode=' + SectionCode + '&t=f&ID=' + ID, '_blank', 350, 280);
                        break;
                    case "Press":
                        PopupCenterWithScroll('../sitefiles/NewsAlertpress.aspx?ID=' + ID + '&t=s&file=' + Name, '_blank', 750, 700);
                        break;
                }

            }
        });
    </script>
    <script type="text/javascript">
        $(document).ready(function () {
            SearchText();
        });
        function SearchText() {
            $(".autosuggest").autocomplete({
                source: function (request, response) {
                    $.ajax({
                        type: "POST",
                        contentType: "application/json; charset=utf-8",
                        url: "../AutoCompleteService.asmx/GetAutoCompleteData",
                        data: "{'username':'" + document.getElementById('txtSendEmail').value + "'}",
                        dataType: "json",
                        success: function (data) {
                            response(data.d);

                        },

                        error: function (result) {
                            alert("Error");
                        }

                    });
                }
            });
        }
    </script>
    <script type="text/javascript">
           $(document).ready(function () {
               SearchText1();
           });
           function SearchText1() {
               $(".auto").autocomplete({
                   source: function (request, response) {
                       $.ajax({
                           type: "POST",
                           contentType: "application/json; charset=utf-8",
                           url: "../AutoCompleteService.asmx/GetAutoCompleteData",
                           data: "{'username':'" + document.getElementById('txtEmailForShareVideo').value + "'}",
                           dataType: "json",
                           success: function (data) {
                               response(data.d);

                           },

                           error: function (result) {
                               alert("Error");
                           }

                       });
                   }
               });
           }
    </script>
    </form>
</body>
</html>
